<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../baselist.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>

    <script type="text/javascript" src="../../js/datepicker/WdatePicker.js"></script>
    <script type="text/javascript">
        function setFactoryName(val) {
            var factoryName= document.getElementById("factoryName")
            factoryName.value=val;
        }
    </script>
</head>
<body>
<form method="post">
    <div id="menubar">
        <div id="middleMenubar">
            <div id="innerMenubar">
                <div id="navMenubar">
                    <ul>
                        <li id="save"><a href="#" onclick="formSubmit('toinsert.action','_self');">确定</a></li>
                        <li id="back"><a href="contract.action">返回</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <div class="textbox" id="centerTextbox">

        <div class="textbox-header">
            <div class="textbox-inner-header">
                <div class="textbox-title">
                    修改货物信息
                </div>
            </div>
        </div>
        <div>
            <div>
                <input type="text"  name="contractId" value="${contractId}">
                <table class="commonTable" cellspacing="1">
                    <tr>
                        <td class="columnTitle_mustbe">生产厂家：</td>
                        <td  class="tableContent">
                            <select name="factoryId" onchange="setFactoryName(this.options[this.selectedIndex].text);">
                                <option value="">--请选择--</option>
                                <c:forEach items="${factoryList}" var="f">
                                    <option value="${f.id}" <c:if test="${products.factoryId==f.id}">selected</c:if>>${f.factoryName}</option>
                                </c:forEach>
                            </select>
                            <input type="hidden" id="factoryName"  name="factoryName" value=""/>
                        </td>

                        <td class="columnTitle_mustbe">货号：</td>
                        <td class="tableContent"><input type="text" name="productNo" value="${products.productNo}"/></td>
                    </tr>
                    <tr>
                        <td class="columnTitle_mustbe">图片：</td>
                        <td class="tableContent"><input type="text" name="productImage" value="${products.productImage}"></td>
                        <td class="columnTitle_mustbe">单价：</td>
                        <td class="tableContent"><input type="text" name="price" value="${products.price}"/></td>
                    </tr>
                    <tr>
                        <td class="columnTitle_mustbe">数量：</td>
                        <td class="tableContent"><input type="text" name="cnumber" value="${products.cnumber}"></td>
                        <td class="columnTitle_mustbe">箱数：</td>
                        <td class="tableContent"><input type="text" name="boxNum" value="${products.boxNum}"/></td>
                    </tr>
                    <tr>
                        <td class="columnTitle_mustbe">装箱率：</td>
                        <td class="tableContent"><input type="text" name="loadingRate" value="${products.loadingRate}"></td>
                        <td class="columnTitle_mustbe">包装单位：</td>
                        <td class="tableContent"><input type="text" name="packingUnit" value="${products.packingUnit}"/></td>
                    </tr>

                    <tr>
                        <td class="columnTitle_mustbe">排序号：</td>
                        <td class="tableContent"><input type="text" name="orderNo" value="${products.orderNo}"/></td>
                        <td class="columnTitle_mustbe">商品的描述：</td>
                        <td class="tableContent"><textarea name="productDesc" style="height:120px;" >${products.productDesc}</textarea></td>
                    </tr>
                </table>
            </div>
        </div>
</div>
</form>
</body>
</html>

